<template>
  <div>
    <span class="iconfont return" @click="up">&#xe61e;</span>
    <topnav v-bind:title="navTitle"></topnav>
    <div class="paymain">
      <div class="mypay">
        <span>账户可用余额</span>
        <span>￥0.00</span>
      </div>
      <el-input  v-model="input" type="number" placeholder="提现金额" style="margin-top:0.25rem"></el-input>
      <div class="notice">
        <span>- 最低提现金额为10元</span><br>
        <span>- 提现消费率为0.6%，最低收取1元，最高收取10元</span>
      </div>
      <div class="paybtn">
        <el-button type="success" v-on:click="getmoney" style="width:6.6rem;font-size:0.38rem">提现</el-button>
      </div>
    </div>

  </div>
</template>
<script>
import topnav from '@/components/topnav'
import Router from '../../router'
var phone = localStorage.getItem('currentUser_name')
export default {
  components: {
    topnav
  },
  data () {
    return {
      input: '',
      navTitle: '提现金额',
      money: ''
    }
  },
  methods: {
    up () {
      Router.push('/index')
    },
    getmoney () {
      let money = this.input
      this.$axios.get('/run.php/Index/index?action=withdraw&&mobile=' + phone, {
        params: {
          money: money
        }
      }).then(res => {
        let msg = res.data.message
        this.$message({
          message: msg,
          type: 'success'
        })
      })
    }
  }
}
</script>
<style lang="stylus" scoped>
 .return
   position absolute
   margin-top 0.8rem
   margin-left 0.5rem
   color #ffffff
 .paymain
    padding 0.2rem
 .mypay
    font-size 0.38rem
    margin-top 0.25rem
  .notice
    margin-top 0.2rem
    font-size 0.3rem
    color #999999
    display flex
    flex-direction column
    height 1rem
    justify-content space-around
   .paybtn
     width 100%
     text-align center
     padding-top 0.25rem
</style>
